USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'salary_grant_details')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table salary_grant_details  
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090826
-- Description:薪酬发放详细信息
-- =============================================
CREATE TABLE [dbo].[salary_grant_details](
	[grd_id] [smallint] IDENTITY(1,1) NOT NULL,
	[salary_grant_id] [varchar](30) NULL,
	[human_id] [varchar](30) NULL,
	[human_name] [varchar](60) NULL,
	[bouns_sum] [money] NULL,
	[sale_sum] [money] NULL,
	[deduct_sum] [money] NULL,
	[salary_standard_sum] [money] NULL,
	[salary_paid_sum] [money] NULL,
 CONSTRAINT [salary_grant_details_PK] PRIMARY KEY CLUSTERED 
(
	[grd_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
-- ==============================================
-- 列名说明
-- ==============================================
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键，自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'grd_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'薪酬发放编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'salary_grant_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'档案编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'human_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'human_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'奖励金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'bouns_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'销售绩效金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'sale_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'应扣金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'deduct_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标准薪酬总额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'salary_standard_sum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'实发薪酬总额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'salary_grant_details', @level2type=N'COLUMN',@level2name=N'salary_paid_sum'